/*
 * @Copyright: (C) 2019 Zhang Rida. All rights reserved.
 *
 * @Author: Zhang Rida
 * @Email: 215154317@qq.com
 * @FilePath: /WEILA_SDK_MODULE/include/wl_dns.h
 * @Date: 2021-02-18 15:07:07
 * @Description: socket for weila osal
 *
 * @LastEditors: Zhang Rida
 * @LastEditTime: 2022-01-13 17:22:57
 */

#ifndef _WL_DNS_H
#define _WL_DNS_H

#include "wl_types.h"

#ifdef __cplusplus
extern "C" {
#endif /*  __cplusplus */

typedef enum {
    WL_DNS_SUCCESS        = 0,
    WL_DNS_PROCESSING     = 1,
    WL_DNS_HOST_NOT_EXIST = 2,
    WL_DNS_TIMEOUT        = 3
} wl_dns_resultcode;

typedef void (*wl_dns_callback)(wl_int32 resultcode, wl_char* host_name, wl_char* host, void* context);

wl_int32 wl_dns_async_gethostbyname(wl_char* host_name, wl_dns_callback callback, void* context, wl_int32 taskid);
wl_int32 wl_dns_gethostbyname(wl_char* host_name, wl_char* host);


#ifdef __cplusplus
}
#endif /*  __cplusplus */
#endif /*  _WL_DNS_H     */
